<?php
namespace app\admin\controller;

use \think\facade\View;

class User
{
    public function index()
    {
        //调用模型层 实例化 调用方法
       $user = new \app\admin\model\User();
       $list = $user->getUser();

        View::assign('list',$list);
        return \view();
    }

    public function getInfo()
    {
        $info=\app\admin\model\User::getUserInfo(1);
        echo "<pre>";
        print_r($info->toArray());
        echo "</pre>";
    }
    public function get_user()
    {
        $where['keywords']='唐僧';
        $info=\app\admin\model\user::getOne(1);

        View::assign('info',$info);
        return \view();
    }
}